
replication code for Do Investor-State Disputes Hurt FDI?, by Andrew Kerner Krzysztof J. Pelc



use "~/pelc kerner BJPS replication data.dta"
 


****table 1******
qui{
est clear
xtreg  FDI l.(sum_pending_full) l.cusum  l.sum_pending_full i.year  if  oecd==0 , fe r
eststo a
xtreg  FDI l.(sum_pending_full_FET notFET) l.cusum   i.year  if  oecd==0 , fe r
eststo b
xtreg  FDI l.(sum_pending_full_direct notdirect) l.cusum   i.year  if  oecd==0 , fe r
eststo c
xtreg  FDI l.(sum_pending_full_indirect notindirect) l.cusum  i.year  if  oecd==0 , fe r
eststo d
xtreg  FDI  l.(sum_pending_full) l.cusum l.(ka_open  ICRG GDP_ polity2)   i.year  if  oecd==0 , fe r
eststo e
xtreg  FDI l.(sum_pending_full_FET notFET) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo f
xtreg  FDI l.(sum_pending_full_direct notdirect) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo g
xtreg  FDI l.(sum_pending_full_indirect notindirect) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo h
}

esttab *, replace label nomtitles  varwidth(20) title (Table 1) alignment(r) addnotes("significance levels: + 0.10 * 0.05 ** 0.01" "all models estimates with country and year fixed effects and cluster robust standard errors") cells(b(star fmt(2)) se(par fmt(2))) starlevels(+ 0.10 * 0.05 ** 0.01)  stats(r2 N)  drop(*year) nogap order (l.cusum)

*****table 2*****
cap drop yr
gen yr=year
recode yr (1993/1998=1)(1999/2004=2)(2005/2010=3)(2011/2016 =4)
replace yr = . if yr >10
est clear
xtreg  FDI l.c.sum_pending_full##ib4.yr   l.cusum  if  oecd==0 , fe robust cluster (cowcode)
est sto a
foreach val in 1 2 3 4 {
lincom l.sum_pending_full + `val'.yr#cl.sum_pending_full
}

qui  xtreg  FDI l.c.sum_pending_full_direct##ib4.yr  c.notdirect##ib4.yr  l.cusum  if  oecd==0  , fe robust cluster (cowcode)
est sto b
foreach val in 1 2 3 4 {
lincom L.sum_pending_full_direct + `val'.yr#cL.sum_pending_full_direct
}

qui xtreg  FDI l.c.sum_pending_full_indirect##ib4.yr  c.notindirect##ib4.yr  l.cusum  if  oecd==0  , fe robust cluster (cowcode)
est sto c
foreach val in 1 2 3 4 {
lincom L.sum_pending_full_indirect + `val'.yr#cL.sum_pending_full_indirect
}
qui xtreg  FDI l.c.sum_pending_full_FET##ib4.yr  c.notFET##ib4.yr  l.cusum if  oecd==0   , fe robust cluster (cowcode)
est sto d
foreach val in 1 2 3 4 {
lincom L.sum_pending_full_FET + `val'.yr#cL.sum_pending_full_FET
}
esttab a d b c  , replace  label nomtitles  varwidth(20) title (Table 2) alignment(r) addnotes("significance levels: + 0.10 * 0.05 ** 0.01" "all models estimates with country and year fixed effects and cluster robust standard errors") cells(b(star fmt(2)) se(par fmt(2))) starlevels(+ 0.10 * 0.05 ** 0.01)  stats(r2 N)   nogap order (l.cusum) 

*******table 3*************
est clear
qui{
est clear
xtreg  FDI l.(sum_pending_full) l.cusum  l.(ka_open ICRG GDP_ polity2)  i.year, fe r
eststo a
xtreg  FDI l.(sum_pending_full_FET notFET) l.cusum    l.(ka_open ICRG GDP_ polity2)   i.year, fe r
eststo b
xtreg  FDI l.(sum_pending_full_direct notdirect) l.cusum   l.(ka_open ICRG GDP_ polity2) i.year    , fe r
eststo c
xtreg  FDI l.(sum_pending_full_indirect notindirect) l.cusum   l.(ka_open ICRG GDP_ polity2) i.year, fe r
eststo d
xtreg  FDI  l.(sum_pending_full) l.cusum   l.(ka_open ICRG GDP_ polity2)  i.year  if  oecd==1 , fe r
eststo e
xtreg  FDI l.(sum_pending_full_FET notFET) l.cusum   l.(ka_open ICRG GDP_ polity2)   i.year  if  oecd==1 , fe r
eststo f
xtreg  FDI l.(sum_pending_full_direct notdirect) l.cusum   l.(ka_open ICRG GDP_ polity2)  i.year  if  oecd==1 , fe r
eststo g
xtreg  FDI l.(sum_pending_full_indirect notindirect) l.cusum    l.(ka_open ICRG GDP_ polity2)   i.year  if  oecd==1 , fe r
eststo h
}

esttab *   ,  label nomtitles  varwidth(20) title (Table 3) alignment(r) addnotes("significance levels: + 0.10 * 0.05 ** 0.01" "all models estimates with country and year fixed effects and cluster robust standard errors") cells(b(star fmt(2)) se(par fmt(2))) starlevels(+ 0.10 * 0.05 ** 0.01)  stats(r2 N)  drop(*year) nogap order (l.cusum)





*********table 4

qui{
est clear
xtreg  FDI l.(sum_pending_full_proInv  sum_pending_full)  l.cusum   l.(ka_open ICRG GDP_ polity2)  i.year  if  oecd==0 , fe r
eststo a
xtreg  FDI l.(sum_pending_full_proInv  sum_pending_full_FET notFET)  l.cusum   l.(ka_open ICRG GDP_ polity2)  i.year  if  oecd==0 , fe r
eststo b
xtreg  FDI l.(sum_pending_full_proInv  sum_pending_full_direct notdirect)  l.cusum   l.(ka_open ICRG GDP_ polity2)  i.year  if  oecd==0, fe r
eststo c
xtreg  FDI l.(sum_pending_full_proInv  sum_pending_full_indirect notindirect)l.cusum   l.(ka_open ICRG GDP_ polity2)  i.year  if  oecd==0 , fe r
eststo d
xtreg  FDI  l.(sum_ICSID_pending_Full) l.cusum l.(ka_open  ICRG GDP_ polity2)   i.year  if  oecd==0 , fe r
eststo e
xtreg  FDI l.(sum_ICSID_pending_FET ICSIDnotFET) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo f
xtreg  FDI l.(sum_ICSID_pending_direct ICSIDnotdirect) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo g
xtreg  FDI l.(sum_ICSID_pending_indirect ICSIDnotindirect) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo h
}

esttab *, replace label nomtitles  varwidth(20) title (Table 1) alignment(r) addnotes("significance levels: + 0.10 * 0.05 ** 0.01" "all models estimates with country and year fixed effects and cluster robust standard errors") cells(b(star fmt(2)) se(par fmt(2))) starlevels(+ 0.10 * 0.05 ** 0.01)  stats(r2 N)  drop(*year) nogap order (l.cusum)




*********table 5


qui{
est clear
xtreg  capex2000 l.(sum_pending_full) l.cusum i.year  if  oecd==0 , fe r
eststo a
xtreg  capex2000 l.(sum_pending_full_FET notFET) l.cusum   i.year  if  oecd==0 , fe r
eststo b
xtreg  capex2000 l.(sum_pending_full_direct notdirect) l.cusum   i.year  if  oecd==0 , fe r
eststo c
xtreg  capex2000 l.(sum_pending_full_indirect notindirect) l.cusum  i.year  if  oecd==0 , fe r
eststo d
xtreg  capex2000  l.(sum_pending_full) l.cusum l.(ka_open  ICRG GDP_ polity2)   i.year  if  oecd==0 , fe r
eststo e
xtreg  capex2000 l.(sum_pending_full_FET notFET) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo f
xtreg  capex2000 l.(sum_pending_full_direct notdirect) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo g
xtreg  capex2000 l.(sum_pending_full_indirect notindirect) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo h
}

esttab *,  label nomtitles  varwidth(20) title (Table 4) alignment(r) addnotes("significance levels: + 0.10 * 0.05 ** 0.01" "all models estimates with country and year fixed effects and cluster robust standard errors") cells(b(star fmt(2)) se(par fmt(2))) starlevels(+ 0.10 * 0.05 ** 0.01)  stats(r2 N)  drop(*year) nogap order (l.cusum)



*****table 6
qui{
est clear

xtreg  capex2000  l.(USPending) l.USBIT l.(ka_open  ICRG GDP_ polity2)   i.year if oecd==0  , fe robust cluster (cowcode)
eststo a
xtreg  capex2000 l.(USFE  USnonFET) l.USBIT l.(ka_open  ICRG GDP_ polity2) i.year  if oecd==0 , fe robust cluster (cowcode)
eststo b
xtreg  capex2000  l.(USD USnonD) l.USBIT l.(ka_open  ICRG GDP_ polity2)   i.year if oecd==0, fe robust cluster (cowcode)
eststo c
xtreg  capex2000 l.(USI  USnonI) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year  if oecd==0 , fe robust cluster (cowcode)
eststo d
xtreg  capex2000 l.(USPending sum_pending_full) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year   if oecd==0 , fe robust cluster (cowcode)
eststo e
xtreg  capex2000 l.(sum_pending_full_FET notFET USFE  USnonFET) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year   if oecd==0 , fe robust cluster (cowcode)
eststo f
xtreg  capex2000 l.(sum_pending_full_direct notdirect  USD USnonD) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year  if oecd==0 , fe robust cluster (cowcode)
eststo g
xtreg  capex2000 l.(sum_pending_full_indirect notindirect USI  USnonI) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year if oecd==0   , fe robust cluster (cowcode)
eststo h
}
esttab *,  label nomtitles  varwidth(20) title (Table 5) alignment(r) addnotes("significance levels: + 0.10 * 0.05 ** 0.01" "all models estimates with country and year fixed effects and cluster robust standard errors") cells(b(star fmt(2)) se(par fmt(2))) starlevels(+ 0.10 * 0.05 ** 0.01)  stats(r2 N)  drop(*year) nogap order (l.USBIT)

qui{
est clear


*****table 7


qui{
est clear
xtreg  capex09_152000 l.(sum_pending_full) l.cusum i.year  if    oecd==0 , fe r
eststo a
xtreg  capex09_152000 l.(sum_pending_full_FET notFET) l.cusum   i.year  if   oecd==0 , fe r
eststo b
xtreg  capex09_152000 l.(sum_pending_full_direct notdirect) l.cusum   i.year  if    oecd==0 , fe r
eststo c
xtreg  capex09_152000 l.(sum_pending_full_indirect notindirect) l.cusum  i.year  if     oecd==0 , fe r
eststo d
xtreg  capex09_152000  l.(sum_pending_full) l.cusum l.(ka_open  ICRG GDP_ polity2)   i.year  if  oecd==0 , fe r
eststo e
xtreg  capex09_152000 l.(sum_pending_full_FET notFET) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if oecd==0 , fe r
eststo f
xtreg  capex09_152000 l.(sum_pending_full_direct notdirect) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo g
xtreg  capex09_152000 l.(sum_pending_full_indirect notindirect) l.cusum l.(ka_open ICRG GDP_ polity2) i.year  if  oecd==0 , fe r
eststo h
}

esttab * ,  label nomtitles  varwidth(20) title (Table 6) alignment(r) addnotes("significance levels: + 0.10 * 0.05 ** 0.01" "all models estimates with country and year fixed effects and cluster robust standard errors") cells(b(star fmt(2)) se(par fmt(2))) starlevels(+ 0.10 * 0.05 ** 0.01)  stats(r2 N)  drop(*year) nogap order (l.USBIT)



*****table8

qui{
est clear

xtreg  capex09_152000  l.(USPending) l.USBIT l.(ka_open  ICRG GDP_ polity2)   i.year if oecd==0  , fe robust cluster (cowcode)
eststo a
xtreg  capex09_152000 l.(USFE  USnonFET) l.USBIT l.(ka_open  ICRG GDP_ polity2) i.year  if oecd==0 , fe robust cluster (cowcode)
eststo b
xtreg  capex09_152000  l.(USD USnonD) l.USBIT l.(ka_open  ICRG GDP_ polity2)   i.year if oecd==0, fe robust cluster (cowcode)
eststo c
xtreg  capex09_152000 l.(USI  USnonI) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year  if oecd==0 , fe robust cluster (cowcode)
eststo d
xtreg  capex09_152000 l.(USPending sum_pending_full) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year   if oecd==0 , fe robust cluster (cowcode)
eststo e
xtreg  capex09_152000 l.(sum_pending_full_FET notFET USFE  USnonFET) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year   if oecd==0 , fe robust cluster (cowcode)
eststo f
xtreg  capex09_152000 l.(sum_pending_full_direct notdirect  USD USnonD) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year  if oecd==0 , fe robust cluster (cowcode)
eststo g
xtreg  capex09_152000 l.(sum_pending_full_indirect notindirect USI  USnonI) l.USBIT l.(ka_open  ICRG GDP_ polity2)    i.year if oecd==0   , fe robust cluster (cowcode)
eststo h
}
esttab *, replace   label nomtitles  varwidth(20) title (Table 7) alignment(r) addnotes("significance levels: + 0.10 * 0.05 ** 0.01" "all models estimates with country and year fixed effects and cluster robust standard errors") cells(b(star fmt(2)) se(par fmt(2))) starlevels(+ 0.10 * 0.05 ** 0.01)  stats(r2 N)  drop(*year) nogap order (l.USBIT)





